# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=eventviews
pkgver=23.08.4
pkgrel=0
pkgdesc="Library for creating events"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> akonadi
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kontact.kde.org/"
license="GPL-2.0-or-later"
depends_dev="
	akonadi-calendar-dev
	akonadi-dev
	calendarsupport-dev
	kcalendarcore5-dev
	kcalutils-dev
	kcodecs5-dev
	kcompletion5-dev
	kdiagram-dev
	kguiaddons5-dev
	kholidays5-dev
	ki18n5-dev
	kiconthemes5-dev
	kmime-dev
	kservice5-dev
	libkdepim-dev
	qt5-qtbase-dev
	"
checkdepends="xvfb-run"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	samurai
	"
_repo_url="https://invent.kde.org/pim/eventviews.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/eventviews-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
4c88354a367eeb9383713020d3a98585b9f79c6ff5f870c26898a0d4b022dc36c3751719d485fb71f6e0868a641c8203e0e9b403221cdedb4c3c6ee869b10c0b  eventviews-23.08.4.tar.xz
"
